package org.kjtc.mapper;

import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.kjtc.entity.WechatMenu;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @Author: xiaojinlu1990@ 163.com
 * @Date: 2019/3/19 0019.
 * @Version 1.0
 */
@Mapper
public interface WxUserMapper {
    @Select("select MenuID, MenuName, MenuKey, Type, Url, Level, OrderNumber, MediaID, AppID, PagePath, Enabled" +
            " from wechat.wechatmenu  where Level='button' order by OrderNumber LIMIT 3")
    List<WechatMenu> getParentMenuID(WechatMenu wechatMenu);

    @InsertProvider(type = WxUserProvider.class, method = "insertWechatMenu")
    int insertWechatMenu(WechatMenu wechatMenu);
}